<template>
	<el-table
		:data="tableData"
		style="width: 100%"
		:header-cell-style="{ padding: 0, 'text-align': 'center' }"
		:cell-style="{ padding: 0, 'text-align': 'center' }"
		max-height="160"
	>
		<el-table-column prop="subject" label="课程" width="100">
			<template slot-scope="scope">
				<img :src="scope.row.imgSrc" alt="" />
			</template>
		</el-table-column>
		<el-table-column prop="name" label="课程名称" width="180"> </el-table-column>
		<el-table-column prop="teacher" label="授课老师"> </el-table-column>
		<el-table-column prop="price" label="课程价格(元)"> </el-table-column>
	</el-table>
</template>

<script>
import request from "../../../api/home";
export default {
	name: "SubjectInfo",
	data() {
		return {
			tableData: [],
		};
	},
	mounted() {
		request.getSubjectData().then((res) => {
			if (res.code == 200 && res.success == 0) {
				console.log(res);
				this.tableData = res.data;
			}
		});
	},
};
</script>

<style lang="less" scoped>
li {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
</style>
